ortp库的安装 |
您所在的位置:网站首页 › 海思 sdk › ortp库的安装 |
版权声明:原创文章,欢迎转载,但请注明出处,谢谢。https://blog.csdn.net/qiuguolu1108/article/details/106445799 ortp库实现了rtp/rtcp协议。 一、环境本文使用Ubuntu18.04安装ortp库,cmake的版本如下: root@learner:~# cmake --version cmake version 3.10.2 二、安装依赖ortp库依赖bctoolbox库,而bctoolbox库依赖mbedtls库。 安装mbedtls库mbedtls库在github的地址:https://github.com/ARMmbed/mbedtls 下载mbedtls git clone https://github.com/ARMmbed/mbedtls 编译安装mbedtls cd mbedtls mkdir build cd build cmake .. -DUSE_SHARED_MBEDTLS_LIBRARY=ON make && make install注意:编译生成的静态库和动态库,库文件安装在了/usr/local/lib,头文件安装在了/usr/local/include。 安装bctoolbox库bctoolbox库在github的地址:https://github.com/BelledonneCommunications/bctoolbox 下载bctoolbox git clone https://github.com/BelledonneCommunications/bctoolbox.git 编译安装bctoolbox cd bctoolbox mkdir _build cd _build cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_TESTS_COMPONENT=NO make && make install 三、ortp库的编译安装ortp库在github的地址:https://github.com/BelledonneCommunications/ortp 下载ortp库 git clone https://github.com/BelledonneCommunications/ortp.git 编译安装ortp cd ortp mkdir _build cd _build cmake .. -DCMAKE_INSTALL_PREFIX=/usr make && make install 添加libmbedtls.so库所在的路径在运行测试示例的时候,会报error while loading shared libraries: libmbedtls.so.12: cannot open shared object file: No such file or directory错误,应该是libmbedtls.so.12库所在的路径/usr/local/lib无法被自动加载。所以需要将上述路径加载到动态库搜索路径中。 vim /etc/ld.so.conf #打开这个文件在打开的文件中添加:/usr/local/lib include /etc/ld.so.conf.d/*.conf /usr/local/lib运行ldconfig 更新一下/etc/ld.so.cache。 测试示例文件在ortp/src/test目录中,进入这个目录。 gcc test_timer.c -lortp -lbctoolbox编译测试文件,运行结果如下: root@learner:/opt/ortp/ortp/src/tests# ./a.out doing something... doing something... doing something... doing something... doing something... doing something... doing something... doing something... doing something... doing something...运行成功~~~ 参考:https://blog.csdn.net/wang3141128/article/details/80481111 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |